
// 生成vue-router的初始化配置代码

import { createRouter, createWebHistory } from 'vue-router';
import Home from '@/views/Home.vue';
import About from '@/views/About.vue';

const routes = [
    {
        path: '/',
        name: 'Home',
        component: () => import('@/views/Home.vue')
    },
    {
        path: '/about',
        name: 'About',
        component: () => import('@/views/About.vue'),
    },
];

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL || '/'),
    routes,
});

export default router;

